﻿using Microsoft.EntityFrameworkCore.Migrations;
using System;

namespace Pear.Database.Migrations.Migrations
{
    public partial class v002 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.InsertData(
                table: "Security",
                columns: new[] { "Id", "CreatedTime", "IsDeleted", "Remark", "UniqueName", "UpdatedTime" },
                values: new object[,]
                {
                    { 1, new DateTimeOffset(new DateTime(2020, 12, 22, 10, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 8, 0, 0, 0)), false, "user.service.profile.self", "user.service.profile.self", null },
                    { 15, new DateTimeOffset(new DateTime(2020, 12, 22, 10, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 8, 0, 0, 0)), false, "role.service.modify", "role.service.modify", null },
                    { 14, new DateTimeOffset(new DateTime(2020, 12, 22, 10, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 8, 0, 0, 0)), false, "role.service.add", "role.service.add", null },
                    { 13, new DateTimeOffset(new DateTime(2020, 12, 22, 10, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 8, 0, 0, 0)), false, "role.service.list", "role.service.list", null },
                    { 12, new DateTimeOffset(new DateTime(2020, 12, 22, 10, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 8, 0, 0, 0)), false, "user.service.securities", "user.service.securities", null },
                    { 11, new DateTimeOffset(new DateTime(2020, 12, 22, 10, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 8, 0, 0, 0)), false, "user.service.securities.self", "user.service.securities.self", null },
                    { 10, new DateTimeOffset(new DateTime(2020, 12, 22, 10, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 8, 0, 0, 0)), false, "user.service.roles", "user.service.roles", null },
                    { 16, new DateTimeOffset(new DateTime(2020, 12, 22, 10, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 8, 0, 0, 0)), false, "role.service.delete", "role.service.delete", null },
                    { 9, new DateTimeOffset(new DateTime(2020, 12, 22, 10, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 8, 0, 0, 0)), false, "user.service.roles.self", "user.service.roles.self", null },
                    { 7, new DateTimeOffset(new DateTime(2020, 12, 22, 10, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 8, 0, 0, 0)), false, "user.service.add", "user.service.add", null },
                    { 6, new DateTimeOffset(new DateTime(2020, 12, 22, 10, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 8, 0, 0, 0)), false, "user.service.delete", "user.service.delete", null },
                    { 5, new DateTimeOffset(new DateTime(2020, 12, 22, 10, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 8, 0, 0, 0)), false, "user.service.modify", "user.service.modify", null },
                    { 4, new DateTimeOffset(new DateTime(2020, 12, 22, 10, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 8, 0, 0, 0)), false, "user.service.modify.self", "user.service.modify.self", null },
                    { 3, new DateTimeOffset(new DateTime(2020, 12, 22, 10, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 8, 0, 0, 0)), false, "user.service.list", "user.service.list", null },
                    { 2, new DateTimeOffset(new DateTime(2020, 12, 22, 10, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 8, 0, 0, 0)), false, "user.service.profile", "user.service.profile", null },
                    { 8, new DateTimeOffset(new DateTime(2020, 12, 22, 10, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 8, 0, 0, 0)), false, "user.service.change.password", "user.service.change.password", null },
                    { 17, new DateTimeOffset(new DateTime(2020, 12, 22, 10, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 8, 0, 0, 0)), false, "role.service.give", "role.service.give", null }
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DeleteData(
                table: "Security",
                keyColumn: "Id",
                keyValue: 1);

            migrationBuilder.DeleteData(
                table: "Security",
                keyColumn: "Id",
                keyValue: 2);

            migrationBuilder.DeleteData(
                table: "Security",
                keyColumn: "Id",
                keyValue: 3);

            migrationBuilder.DeleteData(
                table: "Security",
                keyColumn: "Id",
                keyValue: 4);

            migrationBuilder.DeleteData(
                table: "Security",
                keyColumn: "Id",
                keyValue: 5);

            migrationBuilder.DeleteData(
                table: "Security",
                keyColumn: "Id",
                keyValue: 6);

            migrationBuilder.DeleteData(
                table: "Security",
                keyColumn: "Id",
                keyValue: 7);

            migrationBuilder.DeleteData(
                table: "Security",
                keyColumn: "Id",
                keyValue: 8);

            migrationBuilder.DeleteData(
                table: "Security",
                keyColumn: "Id",
                keyValue: 9);

            migrationBuilder.DeleteData(
                table: "Security",
                keyColumn: "Id",
                keyValue: 10);

            migrationBuilder.DeleteData(
                table: "Security",
                keyColumn: "Id",
                keyValue: 11);

            migrationBuilder.DeleteData(
                table: "Security",
                keyColumn: "Id",
                keyValue: 12);

            migrationBuilder.DeleteData(
                table: "Security",
                keyColumn: "Id",
                keyValue: 13);

            migrationBuilder.DeleteData(
                table: "Security",
                keyColumn: "Id",
                keyValue: 14);

            migrationBuilder.DeleteData(
                table: "Security",
                keyColumn: "Id",
                keyValue: 15);

            migrationBuilder.DeleteData(
                table: "Security",
                keyColumn: "Id",
                keyValue: 16);

            migrationBuilder.DeleteData(
                table: "Security",
                keyColumn: "Id",
                keyValue: 17);
        }
    }
}